package com.linq.cool.system.domain;


import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.linq.cool.common.core.domain.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;

/**
 * @Author: yqlin
 * @Date: 2020/12/29 15:11
 * @Description: 参数配置表
 * @Version: 1.0.0
 */
@EqualsAndHashCode(callSuper = true)
@NoArgsConstructor
@AllArgsConstructor
@Data
@Accessors(chain = true)
@TableName(value = "sys_config")
public class SysConfig extends BaseEntity {

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;


    /**
     * 参数名称
     */
    @NotBlank(message = "参数名称不能为空")
    @Size(min = 0, max = 100, message = "参数名称不能超过100个字符")
    @TableField(value = "`name`")
    private String name;

    /**
     * 参数键名
     */
    @NotBlank(message = "参数键名长度不能为空")
    @Size(min = 0, max = 100, message = "参数键名长度不能超过100个字符")
    @TableField(value = "`key`")
    private String key;

    /**
     * 参数键值
     */
    @NotBlank(message = "参数键值不能为空")
    @Size(min = 0, max = 500, message = "参数键值长度不能超过500个字符")
    @TableField(value = "`value`")
    private String value;

    /**
     * 系统内置（0否 1是）
     */
    @TableField(value = "`type`")
    private Integer type;

    /**
     * 备注
     */
    @TableField(value = "remark")
    private String remark;
}